<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <ul>
    <li>知否知否，等你好久了1</li>
    <li>知否知否，等你好久了2</li>
    <li>知否知否，等你好久了3</li>
    <li>知否知否，等你好久了4</li>
    <li>知否知否，等你好久了5</li>
    <li>知否知否，等你好久了6</li>
  </ul>
  <script>
    /* 返回的是，获取过来元素对象的集合，以伪数组的形式存储 */
    let lis = document.getElementsByTagName("li");
    for (value in lis) {
      console.log(value);
    }
  </script>
</body>

</html>